package com.ruoyi.business.task;

import com.ruoyi.business.service.TimerTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author liutao
 * @version 1.0
 * @description: TODO
 * @date 2024/5/27 19:44
 */
@Slf4j
@Component
public class PlanTask {
    @Resource
    private TimerTaskService timerTaskService;

    /**
     * 0 0 2 * * ?
     */
    @Scheduled(cron = "0 0 1 * * ?")
    public void finishPlan() {
        log.info("-----PlanTask---running finishPlan--");
        timerTaskService.finishPlan();
    }
}
